#include "lvgl.h"
#include "img_def.h"
#include "lv_common_function.h"

 
LV_FONT_DECLARE(Number_HarmonyOS_bpp4_20px);
LV_FONT_DECLARE(Number_HarmonyOS_bpp4_16px);
LV_FONT_DECLARE(Number_HarmonyOS_bpp4_12px);
LV_FONT_DECLARE(Number_HarmonyOS_bpp4_36px);
LV_FONT_DECLARE(Number_HarmonyOS_bpp4_44px);
LV_FONT_DECLARE(Number_HarmonyOS_bpp4_92px);

#define     LV_FONT_SMALL_NUMBER_20PX     &Number_HarmonyOS_bpp4_20px
#define     LV_FONT_SMALL_NUMBER_16PX     &Number_HarmonyOS_bpp4_16px
#define     LV_FONT_SMALL_NUMBER_12PX     &Number_HarmonyOS_bpp4_12px
#define     LV_FONT_BIG_NUMBER_44PX       &Number_HarmonyOS_bpp4_44px
#define     LV_FONT_MEDIUM_NUMBER_36PX    &Number_HarmonyOS_bpp4_36px
#define     LV_FONT_BIG_NUMBER_92PX    	  &Number_HarmonyOS_bpp4_92px

static lv_timer_t *refresh_timer=NULL;

static void btn_event_cb(lv_event_t *e)
{
    printf("click\r\n");
}

static void page1_event_handler(lv_event_t *e)
{
	lv_event_code_t event = lv_event_get_code(e);
	lv_obj_t *obj = lv_event_get_target(e);
	if(!lv_obj_is_valid(obj))
        return;
	if(event == LV_EVENT_DELETE)
	{

	}else if(event == LV_EVENT_KEY)
	{
		uint32_t *key = lv_event_get_param(e);
        switch(*key)
        {
        case KEY1_CODE:
             
             break;
        case KEY3_CODE:
             break;
        case KEY5_CODE: //return
			user_jump_page(fr_list_page);
            break;
        }
		printf("key_code %d \n", *key);
	}

}

void fr_lv_86box_page1_func(lv_obj_t *parent, lv_point_t *top)
{
    if(!lv_obj_is_valid(parent))
    return;
    UI_PARENT_INIT(parent);

    lv_obj_t *btn_obj1 = lv_obj_create(parent);
    lv_obj_set_size(btn_obj1,114,114);
    lv_obj_set_style_pad_all(btn_obj1,0,0);
    lv_obj_set_style_border_width(btn_obj1, 0, 0);
    lv_obj_set_style_bg_color(btn_obj1,lv_color_make(0, 0, 0),0);
    lv_obj_set_pos(btn_obj1,50,131);

    lv_obj_add_event_cb(btn_obj1,btn_event_cb,LV_EVENT_CLICKED,NULL);
    lv_obj_t *btn_obj2 = lv_obj_create(parent);
    lv_obj_set_size(btn_obj2,114,114);
    lv_obj_set_style_pad_all(btn_obj2,0,0);
    lv_obj_set_style_border_width(btn_obj2, 0, 0);
    lv_obj_set_style_bg_color(btn_obj2,lv_color_make(0, 0, 0),0);
    lv_obj_set_pos(btn_obj2,184,131);


    lv_obj_t *btn_obj3 = lv_obj_create(parent);
    lv_obj_set_size(btn_obj3,114,114);
    lv_obj_set_style_pad_all(btn_obj3,0,0);
    lv_obj_set_style_border_width(btn_obj3, 0, 0);
    lv_obj_set_style_bg_color(btn_obj3,lv_color_make(0, 0, 0),0);
    lv_obj_set_pos(btn_obj3,318,131);

    lv_obj_t *left_img = lv_img_create(btn_obj1);//1
	lv_img_set_src(left_img,IMG_TILEVIEW_1);
	lv_obj_align(left_img,LV_ALIGN_CENTER,0,0);

    lv_obj_t *left_img2 = lv_img_create(btn_obj1);//1
	lv_img_set_src(left_img2,IMG_TILEVIEW_GO_HOME);
	lv_obj_align(left_img2,LV_ALIGN_CENTER,0,-20);


    lv_obj_t *mid_img = lv_img_create(btn_obj2);//1
	lv_img_set_src(mid_img,IMG_TILEVIEW_2);
	lv_obj_align(mid_img,LV_ALIGN_CENTER,0,0);

    lv_obj_t *mid_img2 = lv_img_create(btn_obj2);//1
	lv_img_set_src(mid_img2,IMG_TILEVIEW_LEAVE_HOME);
	lv_obj_align(mid_img2,LV_ALIGN_CENTER,0,-20);

    lv_obj_t *right_img = lv_img_create(btn_obj3);//1
	lv_img_set_src(right_img,IMG_TILEVIEW_3);
	lv_obj_align(right_img,LV_ALIGN_CENTER,0,0);

    lv_obj_t *right_img2 = lv_img_create(btn_obj3);//1
	lv_img_set_src(right_img2,IMG_TILEVIEW_MORE);
	lv_obj_align(right_img2,LV_ALIGN_CENTER,0,-20);


    lv_obj_t * left_lab = lv_label_create(btn_obj1);//6
    lv_obj_set_style_text_color(left_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(left_lab,LV_FONT_SMALL_NUMBER_20PX,0);
    lv_label_set_text(left_lab,"回家");
    lv_obj_align(left_lab,LV_ALIGN_CENTER,0,20);

    lv_obj_t * mid_lab = lv_label_create(btn_obj2);//6
    lv_obj_set_style_text_color(mid_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(mid_lab,LV_FONT_SMALL_NUMBER_20PX,0);
    lv_label_set_text(mid_lab,"离家");
    lv_obj_align(mid_lab,LV_ALIGN_CENTER,0,20);


    lv_obj_t * right_lab = lv_label_create(btn_obj3);//6
    lv_obj_set_style_text_color(right_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(right_lab,LV_FONT_SMALL_NUMBER_20PX,0);
    lv_label_set_text(right_lab,"更多");
    lv_obj_align(right_lab,LV_ALIGN_CENTER,0,20);

    lv_obj_t * hour_lab = lv_label_create(parent);//6
    lv_obj_set_style_text_color(hour_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(hour_lab,LV_FONT_BIG_NUMBER_92PX,0);
    lv_label_set_text_fmt(hour_lab,"%02d:%02d",10,12);
    lv_obj_set_pos(hour_lab,48,12);

	lv_obj_t *weather_img = lv_img_create(parent);//1
	lv_img_set_src(weather_img,IMG_WEATHER);
	lv_obj_set_pos(weather_img,353,12);

	lv_obj_t * temp_lab = lv_label_create(parent);//6
    lv_obj_set_style_text_color(temp_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(temp_lab,LV_FONT_MEDIUM_NUMBER_36PX,0);
    lv_label_set_text_fmt(temp_lab,"%02d",26);
    lv_obj_align_to(temp_lab,weather_img,LV_ALIGN_OUT_BOTTOM_MID,0,5);

    lv_obj_t * date_lab = lv_label_create(parent);//6
    lv_obj_set_style_text_color(date_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(date_lab,LV_FONT_MEDIUM_NUMBER_36PX,0);
    lv_label_set_text_fmt(date_lab,"%d/%d",11,17);
    lv_obj_set_pos(date_lab,59,90);

    lv_obj_t * week_lab = lv_label_create(parent);//6
    lv_obj_set_style_text_color(week_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(week_lab,LV_FONT_MEDIUM_NUMBER_36PX,0);
    lv_label_set_text(week_lab,"星期二");
    lv_obj_set_pos(week_lab,228,90);

 	lv_obj_t *ico_img1 = lv_img_create(parent);//2
	lv_img_set_src(ico_img1,IMG_HUMIDITY);
	lv_obj_set_pos(ico_img1,50,250);

 	lv_obj_t * humi_lab = lv_label_create(parent);//6
    lv_obj_set_style_text_color(humi_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(humi_lab,LV_FONT_SMALL_NUMBER_20PX,0);
    lv_label_set_text_fmt(humi_lab,"湿度 %d%%",60);
    lv_obj_set_pos(humi_lab,75,248);

    lv_obj_t *ico_img2 = lv_img_create(parent);//2
	lv_img_set_src(ico_img2,IMG_AIR);
	lv_obj_set_pos(ico_img2,290,250);

 	lv_obj_t * kq_lab = lv_label_create(parent);//6
    lv_obj_set_style_text_color(kq_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(kq_lab,LV_FONT_SMALL_NUMBER_20PX,0);
    lv_label_set_text_fmt(kq_lab,"空气质量 %d",30);
    lv_obj_set_pos(kq_lab,312,248);
	
	lv_obj_add_event_cb(parent, page1_event_handler, LV_EVENT_KEY, NULL);
}


static void page2_event_handler(lv_event_t *e)
{
	lv_event_code_t event = lv_event_get_code(e);
	lv_obj_t *obj = lv_event_get_target(e);
	if(!lv_obj_is_valid(obj))
        return;
	if(event == LV_EVENT_DELETE)
	{

	}else if(event == LV_EVENT_KEY)
	{
		uint32_t *key = lv_event_get_param(e);
        switch(*key)
        {
        case KEY1_CODE:
             
             break;
        case KEY3_CODE:
             break;
        case KEY5_CODE: //return
			user_jump_page(fr_list_page);
            break;
        }
		printf("key_code %d \n", *key);
	}

}

void fr_lv_86box_page2_func(lv_obj_t *parent, lv_point_t *top)
{
    if(!lv_obj_is_valid(parent))
    return;
    UI_PARENT_INIT(parent);

//    lv_obj_t *card_obj1 = lv_obj_create(parent);
//    lv_obj_set_size(card_obj1,104,107);
//    lv_obj_set_style_pad_all(card_obj1,0,0);
//    lv_obj_set_style_border_width(card_obj1, 0, 0);
//    lv_obj_set_style_bg_color(card_obj1,lv_color_make(0, 0, 0),0);
//    lv_obj_set_pos(card_obj1,32,42);
//
//    lv_obj_t *card_obj2 = lv_obj_create(parent);
//    lv_obj_set_size(card_obj2,104,107);
//    lv_obj_set_style_pad_all(card_obj2,0,0);
//    lv_obj_set_style_border_width(card_obj2, 0, 0);
//    lv_obj_set_style_bg_color(card_obj2,lv_color_make(0, 0, 0),0);
//    lv_obj_set_pos(card_obj2,148,42);

    lv_obj_t *card_obj3 = lv_obj_create(parent);
    lv_obj_set_size(card_obj3,174,90);
    lv_obj_set_style_pad_all(card_obj3,0,0);
    lv_obj_set_style_border_width(card_obj3, 0, 0);
    lv_obj_set_style_bg_color(card_obj3,lv_color_make(0, 0, 0),0);
    lv_obj_set_scrollbar_mode(card_obj3,LV_SCROLLBAR_MODE_OFF);
    lv_obj_set_pos(card_obj3,273,170);
    lv_obj_set_style_radius(card_obj3,50,LV_PART_MAIN);


    lv_obj_t *card_obj4 = lv_obj_create(parent);
    lv_obj_set_size(card_obj4,222,120);
    lv_obj_set_style_pad_all(card_obj4,0,0);
    lv_obj_set_style_border_width(card_obj4, 0, 0);
    lv_obj_set_style_bg_color(card_obj4,lv_color_make(0, 0, 0),0);
    lv_obj_set_pos(card_obj4,32,12);


    lv_obj_t *card_obj5 = lv_obj_create(parent);
    lv_obj_set_size(card_obj5,222,120);
    lv_obj_set_style_pad_all(card_obj5,0,0);
    lv_obj_set_style_border_width(card_obj5, 0, 0);
    lv_obj_set_style_bg_color(card_obj5,lv_color_make(0, 0, 0),0);
    lv_obj_set_pos(card_obj5,32,144);

    lv_obj_t *card_obj6 = lv_obj_create(parent);
    lv_obj_set_size(card_obj6,173,140);
    lv_obj_set_style_pad_all(card_obj6,0,0);
    lv_obj_set_style_border_width(card_obj6, 0, 0);
    lv_obj_set_style_bg_color(card_obj6,lv_color_make(0, 0, 0),0);
    lv_obj_set_pos(card_obj6,273,12);
    lv_obj_set_scrollbar_mode(card_obj6,LV_SCROLLBAR_MODE_OFF);
    //lv_obj_add_flag(card_obj6,LV_OBJ_FLAG_HIDDEN);
//    lv_obj_t *card1_img = lv_img_create(card_obj1);//1
//	lv_img_set_src(card1_img,IMG_TILEVIEW2_LEAVE_HOME);
//	lv_obj_align(card1_img,LV_ALIGN_CENTER,0,0);
//
//    lv_obj_t *card2_img = lv_img_create(card_obj2);//1
//	lv_img_set_src(card2_img,IMG_TILEVIEW2_GO_HOME);
//	lv_obj_align(card2_img,LV_ALIGN_CENTER,0,0);

    lv_obj_t *card3_img = lv_img_create(card_obj3);//1
	lv_img_set_src(card3_img,IMG_TILEVIEW2_CURTAIN0);
	lv_obj_align(card3_img,LV_ALIGN_CENTER,0,0);

    lv_obj_t *card4_img = lv_img_create(card_obj4);//1
	lv_img_set_src(card4_img,IMG_TILEVIEW2_LIVING_ROOM);
	lv_obj_align(card4_img,LV_ALIGN_CENTER,0,0);

    lv_obj_t *card5_img = lv_img_create(card_obj5);//1
	lv_img_set_src(card5_img,IMG_TILEVIEW2_RESTAURANT);
	lv_obj_align(card5_img,LV_ALIGN_CENTER,0,0);

    lv_obj_t *card6_img = lv_img_create(card_obj6);//1
	lv_img_set_src(card6_img,IMG_TILEVIEW2_AIR_CONDITIONER_BOTTOM_1);
	lv_obj_align(card6_img,LV_ALIGN_TOP_LEFT,0,0);
    lv_obj_t *card6_img2 = lv_img_create(card_obj6);//1
	lv_img_set_src(card6_img2,IMG_TILEVIEW2_AIR_CONDITIONER_BOTTOM_2);
	lv_obj_align_to(card6_img2,card6_img,LV_ALIGN_OUT_BOTTOM_LEFT,0,0);

//
//    lv_obj_t *mid_img2 = lv_img_create(card_obj1);//1
//	lv_img_set_src(mid_img2,IMG_TILEVIEW_LEAVE_HOME);
//	lv_obj_align(mid_img2,LV_ALIGN_CENTER,0,-20);
//
//    lv_obj_t *left_img2 = lv_img_create(card_obj2);//1
//	lv_img_set_src(left_img2,IMG_TILEVIEW_GO_HOME);
//	lv_obj_align(left_img2,LV_ALIGN_CENTER,0,-20);

    lv_obj_t *right_img2 = lv_img_create(card_obj3);//1
	lv_img_set_src(right_img2,IMG_TILEVIEW2_CURTAIN_1);
	lv_obj_align(right_img2,LV_ALIGN_TOP_RIGHT,-20,10);
    lv_obj_t * cl_lab = lv_label_create(card_obj3);//6
    lv_obj_set_style_text_color(cl_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(cl_lab,LV_FONT_SMALL_NUMBER_20PX,0);
    lv_label_set_text(cl_lab,"窗帘");
    lv_obj_align(cl_lab,LV_ALIGN_TOP_LEFT,30,10);

    lv_obj_t* bar1 = lv_slider_create(card_obj3);
    lv_obj_remove_style(bar1, NULL, LV_PART_KNOB);
	lv_obj_set_style_radius(bar1,30,LV_PART_MAIN);
	lv_obj_set_style_radius(bar1,0,LV_PART_INDICATOR);
    lv_obj_set_style_bg_color(bar1,lv_color_hex(0xFFFFFF),LV_PART_INDICATOR);
    //lv_obj_set_size(bar1, LV_PCT(75), LV_PCT(20));
    lv_obj_align(bar1, LV_ALIGN_BOTTOM_MID, 0, -10);//
    lv_bar_set_mode(bar1, LV_BAR_MODE_SYMMETRICAL);
    lv_bar_set_range(bar1, 0, 100);
    lv_bar_set_value(bar1, 100, LV_ANIM_OFF);
     lv_obj_set_size(bar1,165,30);

    lv_obj_t * kt_lab = lv_label_create(card_obj4);//6
    lv_obj_set_style_text_color(kt_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(kt_lab,LV_FONT_SMALL_NUMBER_20PX,0);
    lv_label_set_text(kt_lab,"厅灯");
    lv_obj_align(kt_lab,LV_ALIGN_TOP_LEFT,30,30);

    lv_obj_t *kt_img = lv_img_create(card_obj4);//1
	lv_img_set_src(kt_img,IMG_TILEVIEW2_LIVING_ROOM_LIGHT);
	lv_obj_align(kt_img,LV_ALIGN_TOP_RIGHT,-20,20);

    lv_obj_t * sw = lv_switch_create(card_obj4);
    lv_obj_set_size(sw,40,21);
    lv_obj_align(sw,LV_ALIGN_TOP_LEFT,20,80);
    lv_obj_set_style_bg_color(sw, lv_color_make(204,204,204), LV_PART_MAIN);
   // lv_obj_set_style_bg_color(sw, lv_color_hex(0x00ff00), LV_PART_INDICATOR | LV_STATE_CHECKED);
    lv_obj_set_style_bg_color(sw, lv_color_hex(0xffffff), LV_PART_KNOB);
    lv_obj_add_state(sw, LV_STATE_DEFAULT);
    //lv_obj_add_event_cb(sw, sw_event_cb, LV_EVENT_VALUE_CHANGED, label);


    lv_obj_t * ct_lab = lv_label_create(card_obj5);
    lv_obj_set_style_text_color(ct_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(ct_lab,LV_FONT_SMALL_NUMBER_20PX,0);
    lv_label_set_text(ct_lab,"餐厅灯");
    lv_obj_align(ct_lab,LV_ALIGN_TOP_LEFT,30,30);

    lv_obj_t *ct_img = lv_img_create(card_obj5);//1
	lv_img_set_src(ct_img,IMG_TILEVIEW2_LIVING_ROOM_LIGHT);
	lv_obj_align(ct_img,LV_ALIGN_TOP_RIGHT,-20,20);

    lv_obj_t * ct_sw = lv_switch_create(card_obj5);
    lv_obj_set_size(ct_sw,40,21);
    lv_obj_align(ct_sw,LV_ALIGN_TOP_LEFT,20,80);
    lv_obj_set_style_bg_color(ct_sw, lv_color_make(204,204,204), LV_PART_MAIN);
    lv_obj_set_style_bg_color(ct_sw, lv_color_hex(0xffffff), LV_PART_KNOB);
    lv_obj_add_state(ct_sw, LV_STATE_CHECKED);


    lv_obj_t * kongt_lab = lv_label_create(card_obj6);
    lv_obj_set_style_text_color(kongt_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(kongt_lab,LV_FONT_SMALL_NUMBER_20PX,0);
    lv_label_set_text(kongt_lab,"空调");
    lv_obj_align(kongt_lab,LV_ALIGN_TOP_LEFT,30,10);

    lv_obj_t * kt_sw = lv_switch_create(card_obj6);
    lv_obj_set_size(kt_sw,40,21);
    lv_obj_align(kt_sw,LV_ALIGN_TOP_RIGHT,-30,10);
    lv_obj_set_style_bg_color(kt_sw, lv_color_make(204,204,204), LV_PART_MAIN);
    lv_obj_set_style_bg_color(kt_sw, lv_color_hex(0xffffff), LV_PART_KNOB);
    lv_obj_add_state(kt_sw, LV_STATE_DEFAULT);


    lv_obj_t * temp_lab = lv_label_create(card_obj6);
    lv_obj_set_style_text_color(temp_lab,lv_color_make(255, 255, 255),0);
    lv_obj_set_style_text_font(temp_lab,LV_FONT_MEDIUM_NUMBER_36PX,0);
    lv_label_set_text(temp_lab,"26℃");
    lv_obj_align(temp_lab,LV_ALIGN_CENTER,0,0);


    lv_obj_t *left_kt_img = lv_img_create(card_obj6);//1
	lv_img_set_src(left_kt_img,IMG_TILEVWE2_PREV_BUTTON);
	lv_obj_align_to(left_kt_img,temp_lab,LV_ALIGN_OUT_LEFT_MID,-20,0);

    lv_obj_t *right_kt_img = lv_img_create(card_obj6);//1
	lv_img_set_src(right_kt_img,IMG_TILEVIEW2_NEXT);
	lv_obj_align_to(right_kt_img,temp_lab,LV_ALIGN_OUT_RIGHT_MID,+20,0);

    lv_obj_t *bt1_img = lv_img_create(card_obj6);//1
	lv_img_set_src(bt1_img,IMG_TILEVIEW2_BUTTON_ONE);
	lv_obj_align(bt1_img,LV_ALIGN_BOTTOM_LEFT,20,-10);

    lv_obj_t *bt2_img = lv_img_create(card_obj6);//1
	lv_img_set_src(bt2_img,IMG_TILEVIEW2_BUTTON_TWO);
	lv_obj_align(bt2_img,LV_ALIGN_BOTTOM_LEFT,60,-10);
	lv_obj_add_event_cb(parent, page1_event_handler, LV_EVENT_KEY, NULL);
}



void fr_lv_86box_page3_func(lv_obj_t *parent, lv_point_t *top)
{
    //printf("page3");
    if(!lv_obj_is_valid(parent))
        return;
    UI_PARENT_INIT(parent);
    lv_obj_set_scrollbar_mode(parent, LV_SCROLLBAR_MODE_OFF);

    lv_obj_t *sub_cont1 = lv_obj_create(parent);
	lv_obj_set_size(sub_cont1,LV_PCT(90),LV_PCT(100));
	lv_obj_set_style_bg_color(sub_cont1,lv_color_black(),0);
	lv_obj_set_style_pad_all(sub_cont1,0,0);
	lv_obj_set_style_pad_bottom(sub_cont1,20,0);
	lv_obj_set_style_pad_top(sub_cont1,20,0);
	lv_obj_set_style_border_width(sub_cont1,0,0);
    lv_obj_set_scrollbar_mode(sub_cont1, LV_SCROLLBAR_MODE_OFF);
    //lv_obj_clear_flag(sub_cont1, LV_OBJ_FLAG_SCROLLABLE);
	lv_obj_align(sub_cont1,LV_ALIGN_TOP_LEFT,10,0);
	//lv_obj_set_style_clip_corner(sub_cont1, true, 0);
    lv_obj_set_scroll_dir(sub_cont1, LV_DIR_VER);
	//lv_obj_set_flex_flow(list_cont, LV_FLEX_FLOW_COLUMN);
	lv_obj_t *old_obj;
	for(uint8_t i = 0; i < 20; i++)
	{
	    lv_obj_t *item_obj = lv_obj_create(sub_cont1);
	    lv_obj_set_style_bg_color(item_obj,lv_color_make(lv_rand(20,0xff),lv_rand(20,0xff),lv_rand(20,0xff)),0);
	    //lv_obj_set_style_border_color(item_obj,lv_color_make(0xff,0x00,0x00),0);
	    lv_obj_set_style_border_width(item_obj,0,0);
		lv_obj_set_size(item_obj,LV_PCT(90),LV_PCT(25));
		lv_obj_set_style_pad_all(item_obj,0,0);
		lv_obj_set_style_radius(item_obj,20,0);
		
//		lv_obj_t *txt_lab = lv_label_create(item_obj);//6
//		lv_obj_set_style_text_color(txt_lab,lv_color_make(255, 255, 255),0);
//		lv_obj_set_style_text_font(txt_lab,LV_FONT_MEDIUM_NUMBER_36PX,0);
//		lv_label_set_text_fmt(txt_lab,"Item %02d",i);
//		lv_obj_align(txt_lab,LV_ALIGN_CENTER,0,0);
		
//		lv_obj_add_event_cb(item_obj, list_menu_event_cb, LV_EVENT_CLICKED, NULL);
//		lv_obj_t* left_img = lv_img_create(item_obj);
//		lv_img_set_src(left_img,list_menu_img_src[i]);
//		lv_obj_align(left_img,LV_ALIGN_LEFT_MID,5,0);
//		lv_obj_t* dis_btn_label = lv_label_create(item_obj);
//		lv_obj_align_to(dis_btn_label,left_img,LV_ALIGN_OUT_RIGHT_MID,20,5);
//        lv_obj_set_style_text_font(dis_btn_label,LV_FONT_OSD_MEDIUM_32PX,0);
//		lv_label_set_text(dis_btn_label,lan_str_table[list_menu_str[i]][get_language_id()]);
		if(i==0)
		{
			lv_obj_align(item_obj,LV_ALIGN_TOP_LEFT,10,0);
		}
		else
		{
			lv_obj_align_to(item_obj,old_obj,LV_ALIGN_OUT_BOTTOM_LEFT,0,5);
		}
		old_obj = item_obj;
	}

}

void fr_lv_86box_page4_func(lv_obj_t *parent, lv_point_t *top)
{
    if(!lv_obj_is_valid(parent))
    return;
    UI_PARENT_INIT(parent);
    lv_obj_t *obj3 = lv_obj_create(parent);
    UI_PARENT_INIT(obj3);
	lv_obj_set_style_border_width(obj3, 0, 0);
    lv_obj_set_style_bg_color(obj3,lv_color_hex(0xff00ff),0);
}

void fr_lv_86box_page5_func(lv_obj_t *parent, lv_point_t *top)
{
    if(!lv_obj_is_valid(parent))
    return;
    UI_PARENT_INIT(parent);
    lv_obj_t *obj4 = lv_obj_create(parent);
    UI_PARENT_INIT(obj4);
	lv_obj_set_style_border_width(obj4, 0, 0);
    lv_obj_set_style_bg_color(obj4,lv_color_hex(0x00ffff),0);
}

void fr_lv_86box_page6_func(lv_obj_t *parent, lv_point_t *top)
{
    if(!lv_obj_is_valid(parent))
    return;
    UI_PARENT_INIT(parent);
    lv_obj_t *obj5 = lv_obj_create(parent);
    UI_PARENT_INIT(obj5);
	lv_obj_set_style_border_width(obj5, 0, 0);
    lv_obj_set_style_bg_color(obj5,lv_color_hex(0xffff00),0);
}
